CFLAGS = -Wall -O2 -fopenmp
LDFLAGS = -s
CC = mpicc

SRC = main.c sieve.c util.c word_map.c
OBJ = $(SRC:.c=.o)
PROGRAM = par-dd

all: $(PROGRAM)

.c.o:
	@echo CC $<
	@$(CC) -c $(CFLAGS) $<

$(PROGRAM): $(OBJ)
	@echo CC -o $@
	@$(CC) $(CFLAGS) -o $@ $(OBJ) $(LDFLAGS)

clean:
	@echo cleaning
	@rm -f $(PROGRAM) $(OBJ)

.PHONY: all clean run
